from django.urls import path

from .views import CreateUserView, ListUserView, LoginUserView, UserInfoView, UpdateUserView, \
    DeleteUserView, RegisterView, LogoutView, UserPackageListView, ChangeUserStatusView

urlpatterns = [
    path('register/', RegisterView.as_view(), name='register'), # 注册
    path('create/', CreateUserView.as_view(), name='create_user'), # 创建用户
    path('userList/', ListUserView.as_view(), name='user_list'), # 用户列表
    path('login/', LoginUserView.as_view(), name='login_user'), # 登录
    path('logout/', LogoutView.as_view(), name='logout'), # 登出
    path('userInfo/<str:user_id>/', UserInfoView.as_view(), name='user_info'), # 用户详情
    path('update/<str:user_id>/', UpdateUserView.as_view(), name='update_user'), # 更新用户
    path('delete/', DeleteUserView.as_view(), name='delete_user'), # 删除用户
    path('userPackageList/', UserPackageListView.as_view(), name='user_package_list'), # 用户套餐列表
    path('changeStatus/<str:user_id>/', ChangeUserStatusView.as_view(), name='change_status'), # 切换用户状态
]
